package com.sjc.geekDesignPattern.bridge.notify;

import com.sjc.geekDesignPattern.bridge.send.IMessageSender;

/**
 * @Classname AbsNotification
 * @Description 变化的是两个或两个以上的维度(同一个维度:具有相同的本质特征)
 * @Date 2020/5/4 12:02
 * @Created by SangJiacun
 */
public abstract class AbsNotification {

    private IMessageSender mSender;

    public AbsNotification(IMessageSender sender) {//抽象化和实现化之间通过组合的方式来链接(桥接)
        this.mSender = sender;
    }

    public void sendMsg(String msg) {
        this.mSender.sendMsg(msg);
        doCustomConfig();
    }

    abstract void doCustomConfig();
}
